class Solution {
public:
    int countGoodStrings(int low, int high, int zero, int one) {
        const int n = high + 1;
        int mod = 1e9 + 7;
        int f[n];
        memset(f, 0, sizeof(f));
        f[0] = 1;
        int ans = 0;
        for(int i = 1; i < n; ++i)
        {
            if(i >= zero) f[i] = f[i - zero];
            if(i >= one) f[i] = (f[i] + f[i - one]) % mod;
            if(i >= low) ans = (ans + f[i]) % mod;
        }
        return ans;
    }
};
